//
// Created by Asus on 2025/6/2.
//

#include <iostream>
#include <numeric>
#include <vector>
#include <bits/ostream.tcc>
using namespace std;

void demo01() {
    vector<int> v;
    for (int i = 0; i < 10; i++) {
        v.push_back(i);
    }
    int total = accumulate(v.begin(), v.end(), 0);
    cout << "total = " << total << endl;
}

class myPrint
{
public:
    void operator()(int val)
    {
        cout << val << " ";
    }
};

void demo02() {
    vector<int> v;
    v.resize(10);
    fill(v.begin(), v.end(), 10);
    for (auto num: v) {
        cout << num << endl;
    }
    cout << endl;
}

int main(int argc, char *argv[]) {
    // demo01();
    demo02();
    return 0;
}
